<?php
/**
 * Copyright (C), 2016-2018, Shall Buy Life info. Co., Ltd.
 * FileName:Order.php
 * Description: 说明
 *
 * @author
 * @Create Date    2021/12/24 16:15:52
 * @Update Date    2021/12/24 16:15:52
 * @version v1.0
 */

namespace Example\Models;

use Example\Filters\QueryFilter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Order extends BasicModel
{
    use SoftDeletes;
    protected $table = 'life_';
    public function __construct(array $attributes = [])
    {
        $this->_name = $this ;
        parent::__construct($attributes);
    }

    protected $fillable = [
        'created_at',
        'updated_at',
        'deleted_at'
    ];

    /**
     * FunctionName：scopeFilter
     * Description：
     * Author：lwl
     * @param $query
     * @param QueryFilter $filters
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeFilter($query, QueryFilter $filters)
    {
        return $filters->apply($query);
    }
}
